export default {
    Base: {
        Title: '表单功能测试',
        Type: '000001',
    },
    Param: [
        // { Key: 'id', Label: '主键', Type: 'Primary' },
        // { Key: 'name', Label: '名称', Type: 'String', Default: '默认名称', },
        // {
        //     Key: 'longitude', Label: '经度', Type: 'Number', Unit: '°', readonly: true,
        //     Rule: { required: true, Description: '', Error: '' },
        //     Event: {
        //         Option: {
        //             'state == 0': { readonly: true, required: true, Label: '经度' },
        //             'state == 1': { readonly: false, required: false, Label: 'longitude' },
        //         }
        //     }
        // },
        // {
        //     Key: 'latitude', Label: '纬度', Type: 'Number', Unit: '°',
        //     readonly: true,
        //     Rule: { required: true, Description: '', Error: '' },
        // },
        // { Key: 'height', Label: '高度', Type: 'Number', Unit: 'm', readonly: true, },
        // {
        //     Key: 'state', Label: '状态', Type: 'Select', Default: 0,
        //     Dict: [{ value: 0, label: '状态1' }, { value: 1, label: '状态2' }, { value: 2, label: '状态3' }]
        // }, 
        // {
        //     Key: 'TestKey1', Label: '测试数据1', Type: 'String', Default: 'A',
        //     Rule: { required: true, Description: '', Error: '' },
        //     Event: { Enable: 'state == 0' },
        // },
        // {
        //     Key: 'TestKey2', Label: '测试数据2', Type: 'String', Default: 'A',
        //     Event: { Enable: 'state == 0' },
        // },
        // {
        //     Key: 'TestKey3', Label: '测试数据3', Type: 'String', Default: 'B',
        //     Event: { Enable: 'state == 1' },
        // },
        // {
        //     Key: 'TestKey4', Label: '测试数据4', Type: 'String', Default: 'B',
        //     Event: { Enable: 'state == 1' },
        // },
        // {
        //     Key: 'TestKey5', Label: '测试数据5', Type: 'String', Default: 'A',
        //     Event: { Value: { 'state == 0': 'A', 'state == 1': 'B', 'state == 2': 'C' } }
        // },
        // { Key: 'Tree', Label: '第一级联动', Type: 'Select', Default: 1, Dict: 'Tree', Rule: { required: true, Description: '', Error: '' }, },
        // { Key: 'TreeChild', Label: '第二级联动', Type: 'Select', Dict: 'Tree:children:null', },
        // { Key: 'TreeChildChild', Label: '第三级联动', Type: 'Select', Dict: 'TreeChild:children:0', },
        { Key: 'child', Label: '对象联动', Type: 'Model:000002' },
        // Dictionary
        {
            Key: 'List', Label: '测试数组', Type: 'Array:String', Default: [], Option: {
                Label: '"第" + index + "组 : "', LabelStyle: { width: '70px' }, ViewType: 'Default', Rule: { required: true, Description: '', Error: '' },
            }
        },
        {
            Key: 'TestDict', Label: '测试字典', Type: 'Dictionary:String', Default: {}, Option: {
                LabelStyle: { width: '70px' }, ViewType: 'Default', Rule: { required: true, Description: '', Error: '' },
            }
        }
    ],
    View: {
        ViewLayout: {
            options: {},
            emits: ['GetValue'],
            render: {
                Top: ['longitude', 'latitude', 'height'],
                Left: ['name', 'state'],
                Bottom: ['TestKey1', 'TestKey2', 'TestKey3', 'TestKey4'],
            },
        },
        EditorLayout: {
            options: {},
            emits: ['GetValue'],
            render: {
                Top: ['longitude', 'latitude', 'height'],
                Left: ['name', 'state'],
                Bottom: ['TestKey1', 'TestKey2', 'TestKey3', 'TestKey4'],
            },
        }, 
        Default: {
            options: {},
            render: [
                { title: '地理信息', children: ['longitude', 'latitude', 'height'] },
                { title: '模型参数', children: ['name', 'state'] },
                { title: '状态联动', children: ['TestKey1', 'TestKey2', 'TestKey3', 'TestKey4'] },
                { title: '数据联动', children: ['TestKey5'] },
                { title: '三级联动', children: ['Tree', 'TreeChild', 'TreeChildChild'] },
                { title: '子集联动', children: ['Default:child'] },
                { title: '测试数组链接', children: ['ArrayList:List'] },
                { title: '测试字典链接', children: ['Default:TestDict'] },
            ],
        },
        Dialog: {
            ShowParentValueKey: 'name',
            width: 700,
            height: 'auto',
        },
        Table: {
            cols: [
                { title: '名称', dataIndex: 'name', key: 'name', },
                { title: '状态', dataIndex: 'state', key: 'state', },
                { title: '操作', key: 'action', Events: ['Editor', 'delete'] },
            ]
        },
        Form: {
            'Default': [
                // { title: '地理信息', children: ['longitude', 'latitude', 'height'] },
                // { title: '模型参数', children: ['name', 'state',] },
                // { title: '状态联动', children: ['TestKey1', 'TestKey2', 'TestKey3', 'TestKey4'] },
                // { title: '数据联动', children: ['TestKey5'] },
                // { title: '三级联动', children: ['Tree', 'TreeChild', 'TreeChildChild'] },
                { title: '子集联动', children: ['Default:child'] },
                { title: '测试数组链接', children: ['ArrayList:List'] },
                { title: '测试字典链接', children: ['Default:TestDict'] },
            ]
        },
    },
}